package com.huike.report.result;

import com.huike.common.constant.HttpStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.formula.functions.T;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResult implements Serializable {
    public static final String CODE_TAG = "code";

    @ApiModelProperty("状态码,200代表成功，500代表发生异常或失败")
    private Integer code;


    private long total; // 总记录数

    private List rows; // 当前页数据集合
    private T params;

    @ApiModelProperty("消息")
    private String msg;
    public static final String MSG_TAG = "msg";

    public static <T> PageResult success(long total,List rows)
    {
        return new PageResult(HttpStatus.SUCCESS, total, rows,null,"查询成功");
    }



}